<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="/common/adminLinks.jsp"/>
<%--
<jsp:include page="/common/adminScripts.jsp"/>
--%>

<div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>徒弟ID</th>
            <th>获得收益(元)</th>
            <th>注册时间</th>
        </tr>
        </thead>
        <tbody id="myTable">
        <c:forEach items="${dataList.data[0].forApprenticesMoney}" var="data">
        <tr>
            <td>${data.id}</td>
            <td>${data.money}</td>
            <td><fmt:formatDate value="${data.date}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            </c:forEach>
        </tbody>
    </table>
    <div class="row">
        <div id="paginationInfo" class="col-md-4 pagination-info"></div>
        <div id="pagination" class="col-md-8"></div>
    </div>
    <div>
        <form:form action="${pageContext.request.contextPath}/apprentice/detail?id=${id}&type=${type}"
                   modelAttribute="customerAttribute" method="get"
                   cssClass="row products-condition" id="myForm">
            <input name="id" type="hidden" value="${id}"/>
            <input name="type" type="hidden" value="${type}"/>
            <form:input type="hidden" path="currentPage" id="currentPage" />
            <form:input type="hidden"  path="pageSize" id="pageSize" />
            <input id="total" type="hidden" value="${dataList.totalCount}"/>
        </form:form>
    </div>
</div>


<script src="<c:url value="/resources/common/js/jquery-1.11.1.min.js" />"></script>
<script src="${pageContext.request.contextPath}/resources/common/js/bootstrap-paginator.js"></script>
<script src="${pageContext.request.contextPath}/resources/js/common/paginator.js"></script>
